<!--摸态框 START-->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="rl-modal-header" id="rl-modal-header">
                <h1>
                    <span class="active-title">登录</span>
                    <span class="">注册</span>
                </h1>
                <button type="button" class="rl-close" data-dismiss="modal"></button>
            </div>
            <div class="modal-body">
                <div class="send_l">
                    <div class="ipt">
                        <div class="form-group mb5">
                            <input type="text" class="form-control" placeholder="请输入登录邮箱" value="" id="cp-lg-email-v">
                            <p class="errorHint" id="cp-lg-email"></p>
                        </div>
                        <div class="form-group mb5">
                            <input type="password" class="form-control" placeholder="请输入登录密码" value="" id="cp-lg-pwd-v">
                            <p class="errorHint" id="cp-lg-pwd"></p>
                        </div>
                    </div>
                    <button type="button" class="btn btn-danger btn-new" id="loginForm">登&nbsp;录</button>
                </div>

                <div class="send_l" style="display: none;">
                    <div class="ipt">
                        <div class="form-group mb5">
                            <input type="text" class="form-control"  placeholder="请输入邮箱" name="email" id="cp-email">
                            <p class="errorHint" id="error-cp-email"></p>
                        </div>
                        <div class="form-group register-wamp mb5">
                            <input type="text" class="form-control register" placeholder="请输入验证码" name="code" id="cp-code">
                            <p class="errorHint" style="width: 60%;" id="error-cp-code"></p>
                            <a href="javascript:;" class="verify-img-wrap Noline">
                                <img src="{:U('Register/verifycode')}" class="verify-img Noline" title="点击刷新验证码" id="code-img" style="width: 95px;">
                            </a>
                        </div>
                    </div>
                    <button type="button" class="btn btn-danger btn-new Noline" id="registerForm">注&nbsp;册</button>
                </div>

            </div>
            <div class="modal-footer">
                <div class="pop-login-sns">
                    <span style="color:#666;margin-left: 18px;">其他方式登录</span>
                    <a href="{:U('Api/Oauth/login',array('type'=>qq))}"><i class="icon-qqs"></i></a>
                    <a href="{:U('Api/Oauth/login',array('type'=>sina))}"><i class="icon-weibos"></i></a>
                </div>
            </div>
        </div>
    </div>
</div>
<!--摸态框  END-->





<!--头部 START-->
<header>
    <nav class="common-topWarp navbar-fixed-top">
        <div class="container">
            <!--左侧区域 开始-->
            <div class="top-left">
                <!-- logo start -->
                <div class="mg-logo hidden-xs">
                    <a href="/"></a>
                </div>
                <!-- end logo -->

                <!-- 导航 区域 START-->
                <div class="mg-top-nav">
                    <nav class="collapse navbar-collapse bs- navbar-collapse">
                        <ul class="nav navbar-nav">
                            <?php $cData = M('Category')->where(array('status'=>1,'parent'=>0))->order('`order` ASC')->select();?>
                            <li><a href="/" <if condition="CONTROLLER_NAME eq 'Index' && ACTION_NAME eq 'index' ">class="active Noline"<else/>class="Noline"</if> data-sc="index">首页</a></li>
                            <foreach name="cData" item="v">
                                <li><a href="/sc/{$v['cid']}.html" <if condition="$v['cid'] eq $cid">class="active Noline"<else/>class="Noline"</if> data-sc="{$v['cid']}">{$v['name']}</a></li>
                            </foreach>
                        </ul>
                    </nav>
                </div>
                <!-- 导航 区域 END -->
            </div>
            <!--左侧区域 介绍-->


            <!--右侧区域  开始-->
            <div class="top-right hidden-xs hidden-sm">
                <!-- 搜索框区域 START -->
                <div class="mg-search-box hidden-xs hidden-sm">
                    <form class="navbar-search" id="global_search_form" action="/Search" method="get">
                        <?php $k_name = isset($_GET['k'])?$_GET['k']:'';?>
                        <input class="form-conetnt search-query" type="text" placeholder="搜索文章关键字" name="k" style="width: 275px;" value="{$k_name}">
                        <i class="icon-search" id="Search-click"></i>
                    </form>
                </div>
                <!-- 搜索框区域 END-->

                <div class="mg-user-nav hidden-xs hidden-sm">
						<span>
                            <if condition="!$_SESSION['user']">
                                <a class="login" href="javascript:;" data-toggle="modal" data-target="#myModal">
                                    <i class="icon-login"></i>
                                    <span>登录</span>
                                </a>
                            <else/>
                                <!--登录后显示的内容 START-->
                                <span class="dropdown" id="msg-show">
                                    <if condition="$msg['comment']['total'] && CONTROLLER_NAME neq 'Comments'">
                                        <div>
                                            <i class="icon-msgs animated pulse"></i>
                                            <span class="badge badge2 animated pulse" style="margin-left: 10px;" id="getMSG2">{$msg['comment']['total']}</span>
                                        </div>
                                    </if>
                                    <a class="avatar dropdown-toggle" href="javascript:;" data-toggle="dropdown" id="dropdownMenu1">
                                        <span id="avatar-a">{$_SESSION['user']['nickname']}</span>
                                        <img src="{$_SESSION['user']['face']}" alt="{$_SESSION['user']['nickname']}">
                                        <b class="caret"></b>
                                    </a>
                                    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                                        <li><a href="/msg">消息<span class="badge" style="margin-left: 60px;background-color: #f4645f;" id="getMSG">{$msg['comment']['total']}</span></a></li>
                                        <li><a href="#" onclick="location.href='{:U('Api/Oauth/loginOut')}'">退出</a></li>
                                    </ul>
                                </span>
                                <!--登录后显示的内容 END-->
                            </if>
						</span>
                </div>
            </div>
            <!--右侧区域  结束-->
        </div>
    </nav>
</header>
<!--头部 END-->